package controller;
import java.awt.event.MouseEvent;
import java.awt.event.MouseListener;

import javax.swing.JPanel;
import javax.swing.border.BevelBorder;

/**
 * 
 */

/**
 * @author Leo COLLET, Nelle VAROQUAUX
 *
 */
public abstract class Clickable extends JPanel implements MouseListener {
	
	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	private static final BevelBorder normalBorder = new BevelBorder(BevelBorder.LOWERED);
	private static final BevelBorder hoverBorder = new BevelBorder(BevelBorder.RAISED);

	public Clickable(){
		
	}
	
	public void mousePressed(MouseEvent e){
		this.setBorder(hoverBorder);
	}
	
	public void mouseReleased(MouseEvent e){
		this.setBorder(normalBorder);
	}
	
	public void mouseClicked(MouseEvent e){
		
	}
	
	public void mouseEntered(MouseEvent e){
		this.setBorder(hoverBorder);
	}
	
	public void mouseExited(MouseEvent e){
		this.setBorder(normalBorder);
	}
	
}
